#include <cstdio>

using namespace std;

typedef long long ll;
const int maxn=100000, maxq=100000;

int fn, ans, func[maxn+maxq+1][2];
bool book[maxn+maxq+1];

ll sqr(ll a) {return a*a;}

int add(int x, int y) {
    fn++;
    func[fn][0]=x, func[fn][1]=y;
    return ++ans;
}

int del(int x, int y) {
    for (int i=1; i<=fn; i++) {
        if (!book[i]) {
            ll temp=sqr(x-func[i][0])+func[i][1];
            if (temp<=y) {
                book[i] = true;
                ans--;
            }
        }
    }
    return ans;
}

int main() {
    freopen("two.in", "r", stdin);
    freopen("check.out", "w", stdout);

    int n, q;
    scanf("%d %d", &n, &q);
    for (int i=1; i<=n; i++) {
        int x, y;
        scanf("%d %d", &x, &y);
        add(x, y);
    }

    for (int i=1; i<=q; i++) {
        int opt, x, y;
        scanf("%d %d %d", &opt, &x, &y);
        printf("%d\n", opt==1 ? add(x, y) : del(x, y));
    }

    fclose(stdin);
    fclose(stdout);
    return 0;
}
